﻿--[[
   @brief    desc for wegame banner 
   @author   harleyxwang
   @version  1.0
   @date     2017-04-21
--]]

ierd_tgp.tpf_ui.Require("event_ids.lua");

wegame_banner_desc =
{
    module_name = "wegame_banner",
    events = 
    {
        {
            c_event = 
            {
                {
                    id = ierd_tgp.login_mgr.LOGIN_ON_LOGIN_SUCCESS,
                    callback = 'banner_control.on_login_success'
                },
                {
                    id  = ierd_tgp.game_mgr.GAME_MGR_PROCESS_CREATED,
                    callback = 'banner_control.on_game_start'
                },
            },
            lua_event = 
            {
                 {
                     id = banner_event.FOCUS_BANNER_ITEM,
                     callback = "banner_control.focus_banner_item"
                 },

                 {
                     id = mainframe_event.CHANGE_MAINFRAME_MODE,
                     callback = "banner_control.change_mainframe_mode"
                 },

                 {
                     id = banner_event.JUMP_MODULE_WEB,
                     callback = "banner_control.jump_module_web"
                 },

                 {
                     id = banner_event.UPDATE_GAME_BASE_INFO,
                     callback = "banner_control.update_game_base_info_for_lua"
                 },
            },
            lua_file = "wegame_banner\\control.lua"
        },

        {
            c_event = 
            {
            },
            lua_event =
            {
                {
                    id = banner_event.BANNER_ADDING_GAME,
                    callback = "WGBannerListEventListener.on_adding_game"
                },
                {
                    id = banner_event.BANNER_ADDING_GAME_CANCEL,
                    callback = "WGBannerListEventListener.on_adding_game_cancel"
                },
                {
                    id = banner_event.BANNER_ADD_GAME_RESULT,
                    callback = "WGBannerListEventListener.on_add_game_result"
                }
            },
            lua_file = "wegame_banner\\banner_list.lua"
        },

        {
            c_event = 
            {
                {
                    id = ierd_tgp.tgp_plugin.QUERY_GAME_AUTHORITY_INFO,
                    callback = 'WGGameAction.on_query_game_authority_info'
                },
                {
                    id = ierd_tgp.game_library.GET_RAIL_GAME_RELEASE_STATUS,
                    callback = "WGGameAction.on_get_rail_game_release_status"
                },
                {
                    id = ierd_tgp.game_library.QUERY_GAME_AUTHORITY_INFO_ERROR_HAPPENED,
                    callback = "WGGameAction.OnQueryGameAuthorityInfoErrorHappened"
                },
                {
                    id = ierd_tgp.game_library.EXCUTE_ACTION,
                    callback = "WGGameAction.on_excute_action"
                },
                {
                    id = ierd_tgp.game_library.SHOW_DOWNLOAD_GAME_WND,
                    callback = "WGGameAction.OnShowDownloadGame"
                },
            },
            lua_event = 
            {
            },
            listen_broadcast = {
                {
                    id = "i_broadcast_excute_action",
                    callback = "WGGameAction.on_broadcast_excute_action"
                },
            },
            lua_file = "wegame_banner\\game_action.lua"
        },

        {
            c_event =
            {
                {
                    id = ierd_tgp.tgp_plugin.QUERY_GAME_AUTHORITY_INFO,
                    callback = "banner_model.on_query_game_authority_info"
                },
                {
                    id = ierd_tgp.game_library.GET_RAIL_GAME_RELEASE_STATUS,
                    callback = "banner_model.on_get_game_release_status"
                },
            },
            lua_event = {},
            lua_file = "wegame_banner\\model.lua"
        }
    }
};

desc_mgr.add(wegame_banner_desc);
ierd_tgp.tpf_ui.Require("wegame_banner\\control.lua");

